package com.fanketly.funacg2.data.entity

import androidx.room.Entity
import androidx.room.PrimaryKey
import com.fanketly.funacg2.data.model.WorkList

@kotlinx.serialization.Serializable
@Entity(tableName = "history")
data class HistoryEntity(@PrimaryKey val id: Int, val title: String, val thumbnailCoverUrl: String)

fun HistoryEntity.conventToWork() =
    WorkList.Work(id = this.id, title = this.title, thumbnailCoverUrl = this.thumbnailCoverUrl)